const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    host: 'localhost',
    port: 80,
    proxy: {
      '/api': {
        target: 'http://127.0.0.1:8081',
        // changeOrigin: true,
        ws: true, // ------------------------- 代理 websockets
        pathRewrite: { //  ------------------- 重写
          '^/api': '/',
        }
      }
    }
  }
})
